package com.easy.base.api.model.entity;

import java.sql.Timestamp;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Entity(name = "user_info")
@Proxy(lazy = false)
@Table(name = "user_info")
@DynamicInsert
@DynamicUpdate
@ApiModel("UserInfoEntity")
public class UserInfoEntity extends BaseEntity {

    public UserInfoEntity(String id, String username, boolean valid, String createBy, Timestamp createDate,
            String updateBy, Timestamp updateDate) {
        super(id);
        this.username = username;
    }

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("密码")
    private String password;
}
